package com.whw.cbf_qimodazuoye.service;

import java.util.Date;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Query;

public interface CheckOrderService {

    /**
     * 新增订单
     * @param checkorderCheckInTimeToString
     * @param checkorderCheckOutTimeToString
     * @param checkorderCount
     * @param checkorderPrice
     * @param checkorderRemark
     * @param checkorderStatus
     * @param hotelId
     * @param userId
     * @param userIdCard
     * @param userName
     * @param userPhone
     * @return
     */
    @POST("checkorder/add")
    Call<ResponseBody> insertCheckOrder(@Query("checkorderCheckInTimeToString") String checkorderCheckInTimeToString, @Query("checkorderCheckOutTimeToString") String checkorderCheckOutTimeToString,

                                        @Query("checkorderCount") int checkorderCount, @Query("checkorderPrice") Integer checkorderPrice,

                                        @Query("checkorderRemark") String checkorderRemark, @Query("checkorderStatus") Integer checkorderStatus,

                                        @Query("hotelId") Integer hotelId, @Query("userId") String userId,
                                        @Query("userIdCard") String userIdCard, @Query("userName") String userName,
                                        @Query("userPhone") String userPhone);

    /**
     * 根据订单id查询订单
     * @param checkOrderId
     * @return
     */
    @GET("checkorder/checkOrderId")
    Call<ResponseBody> selectCheckOrderBycheckOrderId(@Query("checkOrderId")String checkOrderId);

    /**
     * 修改订单状态
     * @param checkorderId
     * @param updatedCheckorderStatus
     * @return
     */
    @PUT("checkorder/status")
    Call<ResponseBody> updatedCheckorderStatus(@Query("checkorderId")String checkorderId,@Query("updatedCheckorderStatus")int updatedCheckorderStatus);

    /**
     * 根据userId查询订单
     * @param userId
     * @return
     */
    @GET("checkorder/userId")
    Call<ResponseBody> selectCheckOrderByUserId(@Query("userId")String userId);

    /**
     * 删除订单
     * @param id
     * @return
     */
    @DELETE("checkorder/")
    Call<ResponseBody> deleteCheckOrderBycheckOrderId(@Query("id")String id);
}
